package com.xiaoq.social.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.xiaoq.social.entity.LikeitEntity;
import com.xiaoq.social.repository.ILikeitRepository;
import com.xiaoq.social.service.ILikeitService;

@Component
public class LikeitServiceImpl implements ILikeitService {
	
	@Autowired
	private ILikeitRepository likeitRep;

	@Override
	public boolean isLikeit(String userId, String tgtId) {
		return likeitRep.isLikeit(userId, tgtId);
	}

	@Override
	public boolean addLikeit(LikeitEntity likeit) {
		
		return likeitRep.addLikeit(likeit);
	}

	@Override
	public boolean delLikeit(String userId, String tgtId) {
		
		return likeitRep.delLikeit(userId, tgtId);
	}

	@Override
	public Long getTgtNums(String tgtId) {
		
		return likeitRep.getTgtNums(tgtId);
	}

}
